package com.team.easybuy.util;

import java.util.Random;

public class CodeUtil {

    public static String getCode(){//生成验证码6位
        while (true){
            Random random = new Random(System.currentTimeMillis());
            int rnum = random.nextInt(2000000);
            if(rnum>1000000){
                String code = rnum+"";
                return code.substring(1);
            }
        }
    }
}
